Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Update workflows to use actions that don't need organization secrets #13991

Merged

Conversation

jdbaldry
Copy link
Member

What this PR does / why we need it:

Each repository can only have 100 organization secrets and there are now more than 100 in our organization which causes inconsistent behavior.

Some repositories don't have the secrets they need assigned.

These composite actions use secrets stored in Vault that are available to all repositories.

Which issue(s) this PR fixes:
Fixes https://github.com/grafana/technical-documentation/issues/979

Special notes for your reviewer:

There is some copy-paste involved in the creation of these workflows. Please check:

For publish-technical-documentation-next.yml:

  • The on.push branches and paths filters are correct for your repository.
  • The jobs.sync.if repository matches your repository.
  • The jobs.sync.steps[1].with.website_directory matches the directory you publish to in the website repository.

For publish-technical-documentation-release.yml:

  • The on.push branches, tags, and paths filters are correct for your repository.
  • The jobs.sync.if repository matches your repository.
  • The jobs.sync.steps[1].with.release_tag_regexp regular expression matches your tags and captures major, minor, and patch versions from those tags.
  • The jobs.sync.steps[1].with.release_branch_regexp regular expression matches your release branch names and captures major and minor versions from those branch names.
  • The jobs.sync.steps[1].with.release_branch_with_patch_regexp regular expression matches your release branch names if they were to include a patch version, and that it would capture major, minor, and patch versions from those branch names.
  • The jobs.sync.steps[1].with.website_directory matches the directory you publish to in the website repository.

We'll also need to backport this to any branches where you are maintaining documentation that you want synced to the website.

Each repository can only have 100 organization secrets and there are now more than 100 in our organization which causes inconsistent behavior.

Some repositories don't have the secrets they need assigned.

These composite actions use secrets stored in Vault that are available to all repositories.

- `publish-technical-documentation-next.yml` has been tested with https://github.com/grafana/writers-toolkit/blob/main/.github/workflows/publish-technical-documentation.yml.
- `publish-technical-documentation-release.yml` has been tested with https://github.com/grafana/backend-enterprise/blob/gem-release-2.13/.github/workflows/publish-technical-documentation-release.yml.

There is some copy-paste involved in the creation of these workflows. Please check:

For `publish-technical-documentation-next.yml`:

- [ ] The `on.push` `branches` and `paths` filters are correct for your repository.
- [ ] The `jobs.sync.if` repository matches your repository.
- [ ] The `jobs.sync.steps[1].with.website_directory` matches the directory you publish to in the website repository.

For `publish-technical-documentation-release.yml`:

- [ ] The `on.push` `branches`, `tags`, and `paths` filters are correct for your repository.
- [ ] The `jobs.sync.if` repository matches your repository.
- [ ] The `jobs.sync.steps[1].with.release_tag_regexp` regular expression matches your tags and captures major, minor, and patch versions from those tags.
- [ ] The `jobs.sync.steps[1].with.release_branch_regexp` regular expression matches your release branch names and captures major and minor versions from those branch names.
- [ ] The `jobs.sync.steps[1].with.release_branch_with_patch_regexp` regular expression matches your release branch names if they were to include a patch version, and that it would capture major, minor, and patch versions from those branch names.
- [ ] The `jobs.sync.steps[1].with.website_directory` matches the directory you publish to in the website repository.

We'll also need to backport this to any branches where you are maintaining documentation that you want synced to the website.

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
@jdbaldry jdbaldry requested a review from a team as a code owner August 28, 2024 14:44
@jdbaldry jdbaldry changed the title Update workflows to use actions that don't need organization secrets chore: Update workflows to use actions that don't need organization secrets Aug 28, 2024
Copy link
Contributor

@JStickler JStickler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[docs team]

@JStickler
Copy link
Contributor

@jdbaldry Will we need to backport these changes?

@jdbaldry
Copy link
Member Author

Yeah, ideally to any branch that you are currently maintaining

@jdbaldry jdbaldry changed the title chore: Update workflows to use actions that don't need organization secrets ci: Update workflows to use actions that don't need organization secrets Sep 10, 2024
@grafanabot
Copy link
Collaborator

Hello @JStickler!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

@grafanabot
Copy link
Collaborator

Hello @JStickler!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

1 similar comment
@grafanabot
Copy link
Collaborator

Hello @JStickler!
Backport pull requests need to be either:

  • Pull requests which address bugs,
  • Urgent fixes which need product approval, in order to get merged,
  • Docs changes.

Please, if the current pull request addresses a bug fix, label it with the type/bug label.
If it already has the product approval, please add the product-approved label. For docs changes, please add the type/docs label.
If the pull request modifies CI behaviour, please add the type/ci label.
If none of the above applies, please consider removing the backport label and target the next major/minor release.
Thanks!

@grafanabot
Copy link
Collaborator

This PR must be merged before a backport PR will be created.

@jdbaldry
Copy link
Member Author

Will need a repo maintainer to merge this, I don't have permissions

@JStickler JStickler merged commit e899826 into main Sep 18, 2024
68 checks passed
@JStickler JStickler deleted the jdb/2024-08-update-publish-workflows-to-avoid-org-secrets branch September 18, 2024 12:47
loki-gh-app bot pushed a commit that referenced this pull request Sep 18, 2024
…ets (#13991)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit e899826)
loki-gh-app bot pushed a commit that referenced this pull request Sep 18, 2024
…ets (#13991)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit e899826)
loki-gh-app bot pushed a commit that referenced this pull request Sep 18, 2024
…ets (#13991)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit e899826)
loki-gh-app bot pushed a commit that referenced this pull request Sep 19, 2024
…ets (#13991)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit e899826)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants